package cn.edu.zjusc.Security;

public class DepositSlot {
	// 用户名
	private String userName;
	// 用户权限
	// 1是学生，100是老师
	private int userType;

	// 系统分配的权限码
	private String authCode;

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public int getUserType() {
		return userType;
	}

	public void setUserType(int userType) {
		this.userType = userType;
	}

	public String getAuthCode() {
		return authCode;
	}

	public void setAuthCode(String authCode) {
		this.authCode = authCode;
	}

	// 定义相等条件
	public boolean equals(Object anObject) {
		if (this == anObject) {
			return true;
		} else {
			if (anObject instanceof DepositSlot) {
				DepositSlot slotTmp = (DepositSlot) anObject;
				return slotTmp.getUserName().trim().equals(this.userName.trim())
						&& slotTmp.getAuthCode().trim()
								.equals(this.authCode.trim());
			} else {
				return false;
			}

		}
	}

	public int hashCode() {
		return 0;
	}
}
